package com.cu.aspt;


import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;



@Aspect
@Component
@Order(1)
public class Aspt {
    @Pointcut("@annotation(com.cu.annotation.Log)")
    public void log2(){

    }
    @After("log2()")
    public void doAfter(JoinPoint joinPoint){
        System.out.println("方法执行后");
    }
    @Before("log2()")
    public void doBefore(){
        System.out.println("方法执行前");
    }



}
